/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package arreglos;

/**
 *
 * @author curso
 */
public class CochePrueba {

    public static void main(String[] args) {
        Coche [] coches = new Coche[4];
        Coche c1 = new Coche("Gallardo", "Lamborghini", 200000.0f, "Amarillo",2000);
        coches[0] = c1;
        coches[1] = new Coche("Fiesta", "Ford", 250000.0f, "Rojo",2011);
        coches[2] = new Coche("Cayenne", "Porsche", 250000.0f, "Azul",2005);
        coches[3] = new Coche("Jetta", "Ford", 250000.0f, "Negro",2010);
        
        /**
         * 
//        for (int i = 0; i < coches.length; i++) {
//            coches[i].imprimir();
//        }
        
        //uso para arreglos y colecciones
        for (Coche coche : coches) {
            coche.imprimir();
        }
         * 
         */
        
        
        LoteCoches lc = new LoteCoches(coches, "Coches seminuevos");
        lc.imprimeAño();
        float promedio = lc.imprimePromedio();
        System.out.println("El promedio de los percios es: " + promedio);
        
    }
}
